package edu.scau.core.Enum;

public enum SkuRecordType {
    IN("入库",0),
    OUT("出库",1)
    ;
    private int signal;
    private String desc;

    public int getSignal() {
        return signal;
    }

    public String getDesc() {
        return desc;
    }

    SkuRecordType( String desc,int signal) {
        this.signal = signal;
        this.desc = desc;
    }
    public static SkuRecordType getBySignal(int signal) {
        for (SkuRecordType status : SkuRecordType.values()) {
            if (status.getSignal() == signal) {
                return status;
            }
        }
        throw new IllegalArgumentException("Invalid signal: " + signal);
    }

}
